// Gieo 2 xuc xac
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int rolldice(){
	int dice_1 = rand() %6 + 1; // KQ xuc xac 1
	int dice_2 = rand() %6 + 1; // KQ xuc xac 2
	int KQ = dice_1 + dice_2;
	return KQ;
}
int main(){
	srand(time(0)); // thay doi day random
	enum status { continues, win, lose};
	int sum, point, point_1;
	status ST;
	cout << "Lan 1: ";
	point_1 = rolldice();
	cout << point_1 << endl;
	if ( point_1 == 7 || point_1 == 11) ST = win;
	else {
		if ( point_1 == 2 || point_1 == 3 || point_1 == 12) ST = lose;
		else ST = continues;
	}
	if ( ST == continues){
		point = rolldice();
		for ( int i = 2;ST == continues; i++){
			cout << "Lan " << i << ": ";
			point = rolldice();
			cout << point << endl;
			if ( point == point_1) ST = win;
			if ( point == 7) ST = lose;
		}
	}
	cout << endl;
	if ( ST == win) cout << "You are winner";
	else cout << "You are lose";
	cout << endl;
	system("pause");
	return 0;
}
